<script setup lang="ts">
defineProps<{
    menu: any[]
}>()
</script>
<template>
    <template v-for="item in menu">
        <el-sub-menu v-if="item.children && item.children.length>0 && !item.meta.isMenu" :index="item.path">
            <template #title>
                <el-icon>
                    <component :is="item.meta.icon"/>
                </el-icon>
                <span>{{ item.meta.title }}</span>
            </template>
            <menu-tree :menu="item.children"/>
        </el-sub-menu>
        <el-menu-item v-else :index="item.path">
            <el-icon>
                <component :is="item.meta.icon"/>
            </el-icon>
            <span>{{ item.meta.title }}</span>
        </el-menu-item>
    </template>
</template>
<style scoped>
</style>
